package com.example.elan.Controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName HelloController
 * @Description TODO
 * @Author Adiljan
 * @Date 2019/11/5 18:08
 **/

@RestController
public class HelloController {

    @Value("${name}")
    private String name;
    @Value("${age}")
    private String age;

    @RequestMapping(value = "/hello",method = RequestMethod.GET)
    public String say(){
        return "亲爱的"+name+"同学，你的年级是："+age+"岁";
    }
}
